{template 'common/header'}
<link rel="stylesheet" type="text/css" href="{MODULE_URL}template/style/main.css">
<ul class="nav  mianbaoxue">
	<a  href="{php echo url('site/entry/category', array('m' => 'yts_qiye'));}">返回分类列表页</a> >> 
	{if $_GPC['id']}编辑内容{else}新增内容{/if}
</ul>





<form id="reply-form" action="" method="post" enctype="multipart/form-data" ng-controller="KeywordReply" class="ng-pristine ng-valid ng-scope">

	<input type="hidden" name="id" value="{$category_info[id]}">
	<div class="zeng_msgbox_layer_wrap" id="q_Msgbox" style="top:30%;display:block;display:none;">
		<span class="zeng_msgbox_layer" style="z-index:10000" id="mode_tips_v2">
			<span class="gtl_ico_hits"></span>
			<span class="tsmsg"></span>
			<span class="gtl_end"></span>
		</span>
	</div>


	<div class="panel panel-default module-1">
	
	    <div class="panel-body">

			
				<div class="form-group">
						<label for="firstname" class="col-sm-2 control-label">类型</label>
						<div class="col-sm-10">
								<select name="type" class="form-control">
									
										<option value="1" {if 1 == $category_info[type]} selected="selected" {/if}>文章</option>
										<option value="2" {if 2 == $category_info[type]} selected="selected" {/if}>产品</option>
										
								</select>
	
						  
						</div>
					</div>
					
		    <div class="form-group">
			    <label for="firstname" class="col-sm-2 control-label">分类名称</label>
			    <div class="col-sm-10">
			      <input type="text" name="title" class="form-control" id="title" placeholder="请输入名称" value="{$category_info[title]}">
			    </div>
			</div>
		    <div class="form-group">
					<label for="firstname" class="col-sm-2 control-label">排序</label>
					<div class="col-sm-10">
					  <input type="text" name="sort" class="form-control" id="title" placeholder="请输入顺序" value="{$category_info[sort]}">
					</div>
				</div>
	




	    </div>
	</div>
		<div class="clearfix"></div>
		<div class="form-group reply-post-action we7-margin-top" style="text-align: center;">
			<div class="">
				{if $_GPC['id']}
				<input type="submit" class="btn btn-primary js-editor-submit multi-submit" style="width:200px" value="保存">
				{else}
				<input type="submit" class="btn btn-primary js-editor-submit multi-submit" style="width:200px" value="发布">
				{/if}
			</div>
		</div>


</form>


<script>
	
	$(".fanslist_table").hide();
	var ggposttype = 'add';
	var currentggObj = null;
	
	$("form").eq(0).submit(function(){
		if($("input[name=title]").val()==''){
			return messageBox("请输入分类名称！");
		}
	
		return true;
	})





	function messageBox(msg){

		if($(".zeng_msgbox_layer_wrap").css("display")=="none"){

			$(".zeng_msgbox_layer_wrap").css("display","block");

			$(".zeng_msgbox_layer_wrap .tsmsg").html(msg);


			setTimeout(function(){

				$(".zeng_msgbox_layer_wrap").css("display","none");				


			},2000);

		}

		return false;
	}



</script>

{template 'common/footer'}